import { h } from "preact";
import { JSX } from "preact";

export interface ContainerProps {
  children?: JSX.Element | JSX.Element[] | string;
  size?: "sm" | "md" | "lg" | "xl" | "full";
  className?: string;
}

export default function Container({ 
  children, 
  size = "full", 
  className = "" 
}: ContainerProps) {
  const sizeClasses = {
    "sm": "max-w-2xl",
    "md": "max-w-4xl",
    "lg": "max-w-6xl",
    "xl": "max-w-7xl",
    "full": "max-w-full"
  };

  return (
    <div className={`container mx-auto px-4 md:px-6 ${sizeClasses[size]} ${className}`}>
      {children}
    </div>
  );
} 